using UnityEngine;
using System.Collections;

public class MenuKeyListener : MonoBehaviour {
	
	private static KeyCode [] USABLE_KEYS =  {	
		KeyCode.Q, KeyCode.W, KeyCode.E, KeyCode.R, KeyCode.T, KeyCode.Y, KeyCode.U, KeyCode.I, KeyCode.O, KeyCode.P, 
		KeyCode.A, KeyCode.S, KeyCode.D, KeyCode.F, KeyCode.G, KeyCode.H, KeyCode.J, KeyCode.K, KeyCode.L, 
		KeyCode.Z, KeyCode.X, KeyCode.C, KeyCode.V, KeyCode.B, KeyCode.N, KeyCode.M,
		
		KeyCode.UpArrow, KeyCode.DownArrow, KeyCode.LeftArrow, KeyCode.RightArrow, KeyCode.Return
	};
	
	public InteractiveDisplay _activeMenu;
	
	public InteractiveDisplay ActiveMenu {
		set {
			_activeMenu = value;
		}			
	}
	
	void Update() {
		
		
		foreach (KeyCode k in USABLE_KEYS) {
			if (Input.GetKeyDown(k)) {
				_activeMenu.DoSomeThing(k);
			}
		}		
	}

}
